load("@fbsource//tools/build_defs:rust_library.bzl", "rust_library")

oncall("build_infra")

rust_library(
    name = "buck2_execute_impl",
    srcs = glob(
        ["src/**/*.rs"],
    ),
    os_deps = [
        (
            "linux",
            [
                "//buck2/app/buck2_forkserver_proto:buck2_forkserver_proto",
                "//buck2/app/buck2_forkserver:buck2_forkserver",
                # @oss-disable[end= ]: "//common/rust/shed/hostcaps:hostcaps",
                # @oss-disable[end= ]: "//justknobs/rust:justknobs",
            ],
        ),
        (
            "macos",
            [
                "//buck2/app/buck2_forkserver_proto:buck2_forkserver_proto",
                "//buck2/app/buck2_forkserver:buck2_forkserver",
            ],
        ),
    ],
    test_deps = [
        "fbsource//third-party/rust:assert_matches",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-condvar-fair",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:chrono",
        "fbsource//third-party/rust:dashmap",
        "fbsource//third-party/rust:derivative",
        "fbsource//third-party/rust:derive_more",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:hostname",
        "fbsource//third-party/rust:indexmap",
        "fbsource//third-party/rust:itertools",
        "fbsource//third-party/rust:once_cell",
        "fbsource//third-party/rust:parking_lot",
        "fbsource//third-party/rust:pin-project",
        "fbsource//third-party/rust:prost-0-13-4",
        "fbsource//third-party/rust:regex",
        "fbsource//third-party/rust:rusqlite",
        "fbsource//third-party/rust:tokio",
        "fbsource//third-party/rust:tokio-stream",
        "fbsource//third-party/rust:tonic-0-12-3",
        "fbsource//third-party/rust:tracing",
        "fbsource//third-party/rust:zstd",
        "//buck2/allocative/allocative:allocative",
        "//buck2/app/buck2_action_metadata_proto:buck2_action_metadata_proto",
        "//buck2/app/buck2_cli_proto:buck2_cli_proto",
        "//buck2/app/buck2_common:buck2_common",
        "//buck2/app/buck2_core:buck2_core",
        "//buck2/app/buck2_data:buck2_data",
        "//buck2/app/buck2_directory:buck2_directory",
        "//buck2/app/buck2_error:buck2_error",
        "//buck2/app/buck2_events:buck2_events",
        "//buck2/app/buck2_execute:buck2_execute",
        "//buck2/app/buck2_execute_local:buck2_execute_local",
        "//buck2/app/buck2_fs:buck2_fs",
        "//buck2/app/buck2_http:buck2_http",
        "//buck2/app/buck2_resource_control:buck2_resource_control",
        "//buck2/app/buck2_util:buck2_util",
        "//buck2/app/buck2_worker_proto:buck2_worker_proto_modern_prost",
        "//buck2/app/buck2_wrapper_common:buck2_wrapper_common",
        "//buck2/dice/dice_futures:dice_futures",
        "//buck2/gazebo/dupe:dupe",
        "//buck2/gazebo/gazebo:gazebo",
        "//buck2/host_sharing:host_sharing",
        "//buck2/remote_execution:remote_execution",
        "//buck2/starlark-rust/starlark_map:starlark_map",
    ],
)
